package com.hyacinth.forumbite.model;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

@Data
@Schema(description = "帖子实体类")
@Accessors(chain = true)
public class Article {
    @Schema(description = "id")
    private Long id;

    @Schema(description = "帖子id")
    private Long boardId;

    @Schema(description = "发帖人id")
    private Long userId;

    @Schema(description = "帖子标题")
    private String title;

    @Schema(description = "访问量")
    private Integer visitCount;

    @Schema(description = "回复数")
    private Integer replyCount;

    @Schema(description = "点赞数")
    private Integer likeCount;

    @Schema(description = "状态 0正常,1禁用")
    private Byte state;

    @Schema(description = "是否删除，0否,1是")
    private Byte deleteState;

    @Schema(description = "创建时间")
    private Date createTime;

    @Schema(description = "更新时间")
    private Date updateTime;

    @Schema(description = "帖子正文")
    private String content;

    @Schema(description = "是否是作者")
    private Boolean own;

    @Schema(description = "关联对象User")
    private User user;

    @Schema(description = "关联对象Board")
    private Board board;
}